package xiangMu.auto.auto02;

public class Bus extends Auto {   //客车类


    public Bus() {  //无参构造方法
    }

    public Bus(String type, String brand, String series, String licencePlate, int seatNumber, int dayRent) {
        super(type, brand, series, licencePlate, seatNumber, dayRent);
    }

    @Override
    public double calcRent(int days) {
        double sumRent = getDayRent() * days;
        if (days >= 150) {
            sumRent *= 0.6;
        } else if (days >= 30) {
            sumRent *= 0.7;
        } else if (days >= 7) {
            sumRent *= 0.8;
        } else if (days >= 3) {
            sumRent *= 0.9;
        }
        return sumRent;
    }
}
